{% extends 'users/space/base.html' %}

{% block title %}
	{{ user.username }}的留言
{% endblock %}

{% block space-external %}
{% endblock %}

{% block space-main %}
	<div class="user-space-content-box">
		{% if user.platepost_set.count == 0 %}
			<div class="alert alert-warning">该用户还没有发表过留言</div>
		{% else %}
			<div class="user-space-content-box-header">
				<h4 class="text-center">TA的留言</h4>
			</div>
			<div class="user-space-content-box-body">
				{% for platepost in user.platepost_set.all %}
					<div class="user-space-content-box-body-box">
						<h4><a href="{% url 'communications:postDetail' platepost.id %}" target="_blank">{{ platepost.title }}</a></h4>
						<div class="row">
							<div class="col-sm-6">
								<span class="glyphicon glyphicon-calendar"></span><span>{{ platepost.created_time|date:'Y-m-d' }}</span>
							</div>
							<div class="col-sm-6">
								<span class="glyphicon glyphicon-th-list"></span><span>{{ platepost.category }}</span>
							</div>
						</div>
					</div>
				{% endfor %}
			</div>
		{% endif %}
	</div>
{% endblock %}
